import request from "@/utils/request";

export function listLoanProduct(params) {
  return request({
    url: "/loan-product",
    method: "get",
    params,
  });
}

export function listPageLoanProduct(params) {
  return request({
    url: "/loan-product/page",
    method: "get",
    params,
  });
}

export function saveLoanProduct(params) {
  return request({
    url: "/loan-product",
    method: "post",
    data: params,
  });
}

export function updateLoanProduct(id,params) {
  return request({
    url: `/loan-product/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteLoanProduct(id) {
  return request({
    url: `/loan-product/${id}`,
    method: "delete",
  });
}

export function deleteBatchLoanProduct(idList) {
  return request({
    url: `/loan-product/batch`,
    method: "delete",
    data: idList,
  });
}

export function getLoanProductById(id) {
  return request({
    url: `/loan-product/${id}`,
    method: "get",
  });
}
